package com.dong.common.core;

/**
 * @author Mr.dongchao
 */
public class ResultData<T> extends Result {
    private static final long serialVersionUID = 2861567413077836923L;

    private T data ;

    public ResultData(String code, String msg) {
        super(code, msg);
    }

    public ResultData(String code, String msg, T data) {
        super(code, msg);
        this.data = data;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public static <T> ResultData<T> ok(T data){
        return new ResultData<T>("200","调用成功",data);
    }
}
